<!-- fr.upmc.components.assemblies.config -->
<html>
<body>
<p>Configuration of component assemblies from XML configuration files.</p>

<p>
This package defines what is required to parse configuration files (class
<code>ConfigurationFileParser</code>) and store the configuration parameters
(class <code>ConfigurationParameters</code>).  The Relax NG schema for the
configuration files is: 
</p>

<pre>
# ---------------------------------------------------------------------------
# A deployment uses:
# - one RMI registry per host (limitation of the RMI registry provided by
#   Oracle that entries may be set only on a registry that runs on the same
#   host),
# - one JVM running the global registry that is mapping port URIs to the host
#   on which RMI registry it is published,
# - one JVM running a  distributed cyclic barrier used to synchronise the
#   deployment processes among the different JVM running components
# - at least one, but more pragmatically more than two JVM running components
#   which are given a URI (this URI is used in the deployment code to know
#   which components must be created by the current JVM and which are created
#   by other virtual machines.
# The configuration file provides application-wide inforamtions required on
# each virtual machine to make the system work properly.
# ---------------------------------------------------------------------------

start = deployment

deployment = element deployment {
  codebase?,             # localisation of the code base of the application
  cyclicBarrier,         # configuration of the cyclic barrier
  globalRegistry,        # configuration of the global registry
  rmiRegistryPort,       # configuration of the RMI registry
  jvms2hostnames         # mapping from JVM to hosts running them
}

codebase = element codebase {
  attribute hostname  { text },  # host on which the code base may be found
  attribute directory { text },  # directory in which the code base may be found
  empty
}

cyclicBarrier = element cyclicBarrier {
  attribute hostname  { text },   # host on which the cyclic barrier is running
  attribute port      { xsd:int } # port number listen by the cyclic barrier
}

globalRegistry = element globalRegistry {
  attribute hostname  { text },   # host on which the global registry is running
  attribute port      { xsd:int } # port number listen by the global registry
}

rmiRegistryPort = element rmiRegistryPort {
  attribute no        { xsd:int }  # port number listen by the RMI registry
}

jvms2hostnames = element jvms2hostnames {
  jvm2hostname+
}

jvm2hostname = element jvm2hostname {
  attribute jvmuri { xsd:anyURI },      # JVM URI
                                        # is this JVM creating the RMI registry
  attribute rmiRegistryCreator { xsd:boolean },
  attribute hostname { text }           # name of the host running that JVM
}
</pre>
</body>
</html>